import time

def for_loop():
    for i in range(10000):
        # print(i)
        pass

# time.time()
start = time.time() # 获取时间戳
for_loop()
end = time.time()
print(end-start)

# time.perf_counter()
start = time.perf_counter()
for_loop()
end = time.perf_counter()
print(end-start)